package com.RedRiver.hospitalsystem.personal_service.client;

import com.RedRiver.hospitalsystem.personal_service.client.param.*;
import com.RedRiver.hospitalsystem.result.Result;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * contextId是项目名，name是client的名字
 */
@FeignClient(contextId = "DoctorClient",name="personal-service",path="personalService/doctor")
public interface DoctorClient {

    @GetMapping("/findDoctor/{doctorId}")
    Result<DoctorInfo>  findDoctor(@PathVariable("doctorId") Integer doctorId);

    @PostMapping("/findAllDoctor")
    Result<IPage> findAllDoctor(@RequestBody PageForm form);

    @PostMapping("/FindDepartmentDoctor")
    Result<IPage> FindDepartmentDoctor(@RequestBody DoctorDepartmentForm doctorDepartmentForm);

    @PostMapping("/FindLevelDoctor")
    Result<IPage> FindLevelDoctor(@RequestBody DoctorLevelForm doctorLevelForm);

    @PostMapping("/createDoctor")
    Result<?> createDoctor(@RequestBody DoctorForm doctorForm);

    @PostMapping("/updateDoctor")
    Result<?> changeDoctor(@RequestBody DoctorChangeForm doctorChangeForm);

    @PostMapping("/deleteDoctor/{doctorId}")
    Result<?> delDoctor(@PathVariable("doctorId") Integer doctorId);

}
